<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>注册</title>
    <link rel="stylesheet" href="../../static/css/bootstrap.css" th:href="@{/css/bootstrap.css}"/>
</head>
<body class="container">
<br/>
<h1>注册</h1>
<br/><br/>
<div class="with:80%">
    <form class="form-horizontal" th:action="@{/register}" method="post">
        <div class="form-group">
            <label for="username" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" name="username" id="username" placeholder="请输入用户名" required/>
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-2 control-label">密码</label>
            <div class="col-sm-10">
                <input type="password" class="form-control" name="password" id="password" placeholder="请输入密码" required/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="submit" value="注册" class="btn btn-primary" />
                &nbsp; &nbsp; &nbsp;
                <a href="/login" class="btn btn-link">已有账号？去登录</a>
            </div>
        </div>
    </form>
    <!-- 显示错误消息 -->
    <div th:if="${error}" class="alert alert-danger" role="alert" style="margin-top:15px;">
        <span th:text="${error}"></span>
    </div>
</div>
</body>
</html>
